/************************************************************************/
/* Name : Kiwon Yun
/* Partner's name : Eric Rooney
/* File Name : RoundInfo.cpp
/* The name of assignment : Iteration 2
/************************************************************************/

#include "RoundInfo.h"
#include "Player.h"

RoundInfo::RoundInfo(void)
{
	m_nSubRoundNum = 0;
	m_pWinner = NULL;
	m_pSecondWinner = NULL;

	m_bCanBet = false;
}

RoundInfo::~RoundInfo(void)
{
}

bool RoundInfo::AddSubRound()
{
	m_nSubRoundNum++;
	if( m_nSubRoundNum >= MAX_BET_ROUND )
		return false;
	else
		return true;
}

int RoundInfo::GetSubRound()
{
	return m_nSubRoundNum;
}

void RoundInfo::SetCurWinner( Player* a_pPlayer )
{
	m_pWinner = a_pPlayer;
}

Player* RoundInfo::GetCurWinner()
{
	return m_pWinner;
}

void RoundInfo::SetCurSecondWinner( Player* a_pPlayer )
{
	m_pSecondWinner = a_pPlayer;
}

Player* RoundInfo::GetCurSecondWinner()
{
	return m_pSecondWinner;
}

void RoundInfo::AddTiedWinnerPlayer( Player* a_pPlayer )
{
	m_vecTiedWinnerPlayer.push_back( a_pPlayer );
}

void RoundInfo::ClearTiedWinnerPlayer()
{
	m_vecTiedWinnerPlayer.clear();
}

int RoundInfo::GetTiedWinnerNumber()
{
	return (int)m_vecTiedWinnerPlayer.size();
}

Player* RoundInfo::GetTiedWinner( int a_nIndex )
{
	return m_vecTiedWinnerPlayer[ a_nIndex ];
}

bool RoundInfo::IsCanBet()
{
	if( m_nSubRoundNum % 2 == 1 )
		return false;
	else
		return true;
}
